perm filename SHOW2.SAI[AER,HPM] blob sn#209476 filedate 1976-04-04 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	BEGIN "SHOWER"
C00005 ENDMK
C⊗;
BEGIN "SHOWER"
REQUIRE "VIXHDR.SAI[VIS,HPM]" SOURCE_FILE;
INTEGER I,J,K,L,M,LOX,LOY,HIX,HIY,FOO;
STRING INPS,INFL,INFLT;

DDINIT;

WHILE TRUE DO
   BEGIN
   REAL CX,CY,SIZ;

   DRKEN; RECTAN(-1000,-1000,1000,1000);
   OUTSTR('15&'12&'12);

   OUTSTR("FILES:"); INFLT←INCHWL;

   INFL←"";
   WHILE INFLT≠"*" DO INFL←INFL&LOP(INFLT);
   I←LOP(INFLT);

   OUTSTR("LOW X, HIGH X:");  INPS←INCHWL;
   LOX←INTSCAN(INPS,FOO);  HIX←INTSCAN(INPS,FOO);

   IF LOX>HIX THEN LOX↔HIX; LOX←(LOX MAX 0) MIN 3; HIX←(HIX MAX 0) MIN 3;
   
   OUTSTR("LOW Y, HIGH Y:");  INPS←INCHWL;
   LOY←INTSCAN(INPS,FOO);  HIY←INTSCAN(INPS,FOO);

   IF LOY>HIY THEN LOY↔HIY; LOY←(LOY MAX 0) MIN 3; HIY←(HIY MAX 0) MIN 3;
   
   CX←(LOX+HIX+1)/2;  CY←(LOY+HIY+1)/2;
   SIZ←(HIX-LOX+1) MAX (HIY-LOY+1); SIZ←SIZ/2;
   
   SCREEN(CX-SIZ,CY+SIZ,CX+SIZ,CY-SIZ);

      BEGIN
      INTEGER ARRAY PIC[0:PFLDIM(INFL&"00"&INFLT)];
      INTEGER X,Y;
      
      FOR I←0 STEP 1 UNTIL 7 DO FOR J←0,0,0,0,0 DO DPYUP(SYNMAP(I));

      GETPFL(INFL&"00"&INFLT,PIC[0]);
      MAPMON(0.5);

      FOR I←0 STEP 1 UNTIL PIC[BYBI]-1 DO
      IF SYNMAP(I)>0 THEN
         BEGIN
         ERASE(SYNMAP(I));
         DRKEN; RECTAN(-1000,-1000,1000,1000);
         FOR X←LOX STEP 1 UNTIL HIX DO
         FOR Y←LOY STEP 1 UNTIL HIY DO
            BEGIN
            GETPFL(INFL&CVS(Y)&CVS(X)&INFLT,PIC[0]);
            DRKEN; RECTAN(X,Y,X+1,Y+1); 
            VID(X,Y,X+1,Y+1,PIC[0],1 ASH (PIC[BYBI]-1-I));
            OUTSTR("["&CVS(Y)&","&CVS(X)&"] ");
            FOR J←0,0,0 DO DPYUP(SYNMAP(I));
            END;
         END;
      END;
   END;

END;